package com.itany.shop.listener;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/4/20 10:49
 * Version:1.0-SNAPSHOT
 * Description:
 */
@WebListener
public class SessionLifeListener implements HttpSessionListener {
    @Override
    public void sessionCreated(HttpSessionEvent httpSessionEvent) {
        System.out.println("--------------创建session对象");
    }

    @Override
    public void sessionDestroyed(HttpSessionEvent httpSessionEvent) {
        System.out.println("--------------销毁session对象");
    }
}
